package week07.data_obs;

import java.util.Observable;
import java.util.Observer;

/**
 * Created by zhangxiaokun on 2018/3/13.
 */
public class NumObserver implements Observer {
    @Override
    public void update(Observable o, Object arg) {
        NumObservable numObservable = (NumObservable) o;
        int data = numObservable.getData();
        System.out.println("Data has changed to " + data);

    }
}
